package club.jdiy.core.storage;

/**
 * Storable 抽象实现类.
 *
 * @author ziquee(子秋) QQ号:39886616 主页: http://www.jdiy.club
 * @version 20200725
 */
@SuppressWarnings("unused")
public abstract class AbstractStorble<T> implements Storable<T> {
    private Store store;
    protected T id;

    @Override
    public Storable<T> initStore(StoreAware appContext) {
        this.store = appContext.getStore(getStoreBucket(), String.valueOf(getId()));
        return this;
    }

    @Override
    public Store getStore() {
        return store;
    }
}
